package de.baumann.browser.present.duobao

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.api.net.vo.duobao.WFGZ
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.duobao.IWanFaGuiZeView
import de.baumann.browser.model.getOdinTreasureConfig

class WanFaGuiZePresenter : BasePresenter<IWanFaGuiZeView>() {
    fun getwfgz() {
        getOdinTreasureConfig()
                .subscribe(object : OdinObserver<WFGZ>(view) {
                    override fun onSuccess(data: WFGZ?) {
                        if (data != null)
                            view?.setHtml(data.TreasureConfig)
                    }
                })
    }
}